// Created by Administrator on 2015/12/8.

extends public_menu
block person_menu_content
    if(!messages || messages.length==0)
        .text-center 没有任何消息哦~
    else
        table.table
            each item in messages || []
                tr
                    p
                        case item.type
                            when Message.TYPE_UPVOTE_RECIPE
                                if(!item.obj_title)
                                    p(style='color:red; font-size:12px;text-decoration: underline;') 该消息下的主题已被删除~
                                else
                                    if(!item.another_already_read)
                                        span(style='color:red') [新]&nbsp;
                                    a(href='/user/#{item.user_nick}' target='_blank' style='color:#337ab7') #{item.user_nick}
                                    | &nbsp;点赞了你的菜谱&nbsp;
                                    a(href='/recipe/details/#{item.obj_id}' target='_blank' style='color:#337ab7') #{item.obj_title}
                            when Message.TYPE_UPVOTE_MENU
                                if(!item.obj_title)
                                    p(style='color:red; font-size:12px;text-decoration: underline;') 该消息下的主题已被删除
                                else
                                    if(!item.another_already_read)
                                        span(style='color:red') [新]&nbsp;
                                    a(href='/user/#{item.user_nick}' target='_blank') #{item.user_nick}
                                    | 点赞了你的菜单
                                    a(href='/menu/detail/#{item.obj_id}' target='_blank') #{item.obj_title}
                            when Message.TYPE_FOCUS_YOU
                                a(href='/user/#{item.user_nick}' target='_blank') #{item.user_nick}
                                | 关注了你
